package mychnxi.demo.java.util;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.modules.junit4.PowerMockRunner;

import java.util.HashMap;
import java.util.Random;

@RunWith(PowerMockRunner.class)
public class HashMapTest {

    @Test
    public void computeIfAbsent_test(){
        HashMap<String, String> datas = new HashMap<>(16);
        final int num =0;
        for (int i=0; i<32; i++){
            datas.computeIfAbsent("key_"+i, v -> {return Math.random()+"_val";});
        }

    }

}
